<#import '/ftlLibrary/properteisVariable.ftl' as pv/>
<link href="assets/css/bootstrap-select.css" rel="stylesheet"/>
<link href="assets/css/front/listCommonStyle.css" rel="stylesheet"/>
<link href="assets/css/modify.css" rel="stylesheet"/>
<script src="assets/js/select2/select2.js"></script>
<style>
    .bootbox-close-button {
        width: 19px;
        height: 19px;
        border: none;
        cursor: pointer;
        -webkit-appearance: none;
        float: right;
        top: 4px;
        left: -5px;
        position: relative;
        background: #E9F5FF url("assets/img/nav-img/icon_close.png") no-repeat 0 0;
    }
    .bootbox .modal-dialog {
        width: 60% !important;
    }

    .modal-content {
        width: 100%;
    }
</style>
<div class="row myDialogDetai7 myDialogDetai" style="margin-left:0px!important;">
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
        <div class="row" style="margin-bottom: 15px;margin-top:15px;font-size: 14px">
            <span style="padding-left: 16px">
                退款信息
            </span>
        </div>
        <div class="widget flat radius-bordered" style="margin-top: 0;box-shadow:0px 0px 10px rgba(122,161,184,0.3);">
            <div class="widget-body no-padding">
                <div class="topPagingBar hidden">
                    <form>
                        <input type="hidden" name="checkboxId" id="checkboxId" value="0">
                    </form>
                </div>
                <div class="table-scrollable" style="border: none;">
                    <!-- 数据表列信息列表 -->
                    <table class="table table-hover dataTable newtable">
                        <thead>
                        <tr>
                            <th title="费用类型">费用类型</th>
                            <th title="费用明细">费用明细</th>
                            <th title="报名状态">报名状态</th>
                            <th title="缴费金额(元)">缴费金额(元)</th>
                            <th title="缴费时间">缴费时间</th>
                            <th title="操作人">操作人</th>
                            <th title="操作时间">操作时间</th>
                            <th title="退款状态">退款状态</th>
                            <th title="操作">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <#if viewRefundDetailsList?size==0>
                            <tr>
                                <td align="center">无数据</td>
                            </tr>
                        </#if>
                        <#list viewRefundDetailsList as data>
                            <tr>
                                <td>2</td>
                                <td>${(data.paymentType???string(data.paymentType?html,""))!''}</td>
                                <td>${(data.packageName???string(data.packageName?html,""))!''}</td>
                                <td>-</td>
                                <td>${(data.sumPrice???string(data.sumPrice?html,""))!''}</td>
                                <td>${(data.createTime???string(data.createTime?html,""))!''}</td>
                                <td>${(data.updateTime???string(data.updateTime?html,""))!''}</td>
                                <td>${(data.amout???string(data.amout?html,""))!''}</td>
                                <td>${(data.refundCode???string(data.refundCode?html,""))!''}</td>
                                <td>${(data.userName???string(data.userName?html,""))!''}</td>
                                <td>${(data.refundStatus???string(data.refundStatus?html,""))!''}</td>
                                <td><a href="javascript:void(0);" onclick="details(this)" packageId=${data.packageId}>+</a></td>
                            </tr>
                        </#list>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>


    </div>


</div>
<script>
    $(".selectpicker").select2();

    function details(that) {
        var packageId = $(that).attr("packageId");
        var htmlTitle = "";
        ajaxRequest("tssPaymentController/packagePaymentDetails.do", {
            packageId: packageId
        }, function (result) {
            var data=result.data;
            var arr="";
            for (var i = 0; i< data.length; i++) {
                arr+=('<tr value="'+data[i].id+'">' +
                    '<td>'+i+'</td>' +
                    '<td>'+data[i].paymentType+'</td>' +
                    '<td>'+data[i].contractNumber+'</td>' +
                    '<td>'+data[i].paymentType+'</td>' +
                    '<td>'+data[i].applyStatus+'</td>' +
                    '<td>'+data[i].amount+'</td>' +
                    '<td>'+data[i].discountedPrice+'</td>' +
                    '<td>'+data[i].paymentCode+'</td>' +
                    '<td>'+data[i].updateTime+'</td>' +
                    '<td>'+data[i].userName+'</td>' +
                    '<td>'+data[i].remark+'</td>' +
                    '</tr>');
            }
            console.log(arr);
            $("."+packageId).after(arr);


        }, function () {
            ajaxError("加载页面失败!")
        }, "get", "json")

    }
</script>